-- GENERATED SPELL FOR [Crystalcore Mechanic] --


function spell0_20052(pUnit, Event) --@Recharge,Heal--
pUnit:FullCastSpellOnTarget(37121,pUnit)
pUnit:RegisterEvent('Sorts_20052', 10000, 1)
end

function spell1_20052(pUnit, Event) --@Saw Blade,n/a--
pUnit:FullCastSpellOnTarget(37123,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20052', 8000, 1)
end

function Sorts_20052(pUnit, Event)
local choix_sorts_20052 = math.random(0, 1)
if choix_sorts_20052 == 0 then
pUnit:RegisterEvent('spell0_20052', 1, 1)
end
if choix_sorts_20052 == 1 then
pUnit:RegisterEvent('spell1_20052', 1, 1)
end
end

function mob20052_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20052', math.random(1500, 3000), 1)
end

function mob20052_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20052_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20052_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20052, 1, 'mob20052_Action')
RegisterUnitEvent(20052, 2, 'mob20052_Leave')
RegisterUnitEvent(20052, 3, 'mob20052_Kill')
RegisterUnitEvent(20052, 4, 'mob20052_Die')
